<?
	require_once "functions.php"
?>

<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Final Exam</title>
<h1>Final Exam</h1>

<?
$statesresults = contactBase();
?>
</head>

<body>

  <script>
  $(document).ready(function() 
  {
    $("input#states").autocomplete(  {
    source: [
        <? while ($sr = $statesresults->fetch_assoc()){ ?>
        "<?=$sr['name']?>", "<?=$sr['abbrev']?>", 
        <? } ?>
        ]
		});
  });
  </script>
  
<div class="ui-widget">
        <label for="states">Type in location in the database (state, territory, place or region): </label>
        <input id="states">       
</div>

</body>
</html>
